package com.mes.biz.service.impl;

import com.mes.biz.domain.BizAfterSaleOrderAttach;
import com.mes.biz.mapper.BizAfterSaleOrderAttachMapper;
import com.mes.biz.service.BizAfterSaleOrderAttachService;
import com.mes.common.core.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 售后单附件Service业务层处理
 * @author hwg
 * @email hwg
 * @date 2023-03-27
 */
@Service
@Transactional(readOnly = true)
public class BizAfterSaleOrderAttachServiceImpl extends BaseServiceImpl<BizAfterSaleOrderAttachMapper, BizAfterSaleOrderAttach> implements BizAfterSaleOrderAttachService {

    @Resource
    private BizAfterSaleOrderAttachMapper bizAfterSaleOrderAttachMapper;

    @Override
    public List<BizAfterSaleOrderAttach> getBizAfterSaleOrderAttachBySaleOrderId(String saleOrderId) {
        return bizAfterSaleOrderAttachMapper.getBizAfterSaleOrderAttachBySaleOrderId(saleOrderId);
    }

    @Override
    public List<BizAfterSaleOrderAttach> getAttachByOrderIdWithType(String saleOrderId, String attachType) {
        return bizAfterSaleOrderAttachMapper.getAttachByOrderIdWithType(saleOrderId,attachType);
    }

    @Override
    public void removeBySaleOrderId(String saleOrderId,String attachType) {
        bizAfterSaleOrderAttachMapper.removeBySaleOrderId(saleOrderId,attachType);
    }
}
